package cn.iocoder.yudao.module.asasc.controller.admin.openapi.vo;

import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
public class CampaignDataUnionVO {
    private List<Row> row;
    private GrandTotals grandTotals;

    @Data
    @ToString
    public static class Row {
        private boolean other;
        private List<Granularity> granularity;
        private Total total;
        private Metadata metadata;

        @Data
        public static class Granularity {
            private int impressions;
            private int taps;
            private int installs;
            private int newDownloads;
            private int redownloads;
            private int latOnInstalls;
            private int latOffInstalls;
            private double ttr;
            private Amount avgCPA;
            private Amount avgCPT;
            private Amount avgCPM;
            private Amount localSpend;
            private double conversionRate;
            private String date;
        }

        @Data
        public static class Total {
            private int impressions;
            private int taps;
            private int installs;
            private int newDownloads;
            private int redownloads;
            private int latOnInstalls;
            private int latOffInstalls;
            private double ttr;
            private Amount avgCPA;
            private Amount avgCPT;
            private Amount avgCPM;
            private Amount localSpend;
            private double conversionRate;
        }

        @Data
        public static class Metadata {
            private long campaignId;
            private String campaignName;
            private boolean deleted;
            private String campaignStatus;
            private App app;
            private String servingStatus;
            private Object servingStateReasons; // Adjust the type if necessary
            private List<String> countriesOrRegions;
            private String modificationTime;
            private Object totalBudget; // Assuming totalBudget is an object, adjust the type if necessary
            private DailyBudget dailyBudget;
            private String displayStatus;
            private List<String> supplySources;
            private String adChannelType;
            private long orgId;
            private Object countryOrRegionServingStateReasons; // Adjust the type if necessary
            private String billingEvent;
            private String countryOrRegion;

            @Data
            public static class App {
                private String appName;
                private long adamId;
            }

            @Data
            public static class DailyBudget {
                private String amount;
                private String currency;
            }
        }
    }

    @Data
    public static class GrandTotals {
        private boolean other;
        private Total total;

        @Data
        public static class Total {
            private int impressions;
            private int taps;
            private int installs;
            private int newDownloads;
            private int redownloads;
            private int latOnInstalls;
            private int latOffInstalls;
            private double ttr;
            private Amount avgCPA;
            private Amount avgCPT;
            private Amount avgCPM;
            private Amount localSpend;
            private double conversionRate;
        }
    }

    @Data
    public static class Amount {
        private String amount;
        private String currency;
    }
}

